home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-18 | 838 b | 43 lines | [TEXT/CWIE] |
- unit MyGrowZonesAlert;
-
- interface
-
- procedure StartupGrowZonesAlert;
- procedure ConfigureGrowZonesAlert(alertid: integer);
-
- implementation
-
- uses
- MyCleverAlerts, MyGrowZones, MyStartup;
-
- var
- alert_id: integer;
- last_time_was_critical: Boolean;
-
- procedure ConfigureGrowZonesAlert(alertid: integer);
- begin
- StartupGrowZonesAlert;
- alert_id := alertid;
- end;
-
- procedure IdleGrowZonesAlert;
- var
- this_time_was_critical: Boolean;
- begin
- IdleGrowZone;
- this_time_was_critical := MemoryCritical;
- if this_time_was_critical and not last_time_was_critical then begin
- CleverNotifyAlert(alert_id);
- end;
- last_time_was_critical := this_time_was_critical;
- end;
-
- procedure StartupGrowZonesAlert;
- begin
- last_time_was_critical := false;
- StartupGrowZones;
- SetStartup(nil, IdleGrowZonesAlert, 0, nil);
- end;
-
- end.
-